import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Main from '@/components/Main'
import User from '@/components/system/User'
import Role from '@/components/system/Role'
import Force from '@/components/system/Force'
import List from '@/components/book/List'
import Check from '@/components/book/Check'

Vue.use( Router )

export default new Router( {
  routes: [ {
      path: '/',
      name: 'Main',
      component: Main,
      children: [ {
        name: '系统管理:用户管理',
        path: '/sys/user',
        component: User
      }, {
        name: '系统管理:角色管理',
        path: '/sys/role',
        component: Role
      },  {
        name: '系统管理:权限管理',
        path: '/sys/force',
        component: Force
      },{
        name: '预订管理:预订记录',
        path: '/book/list',
        component: List
      }, {
        name: '预订管理:预订审批',
        path: '/book/check',
        component: Check
      }]
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    }
  ]
} )